<div class="title-body-content"><?php echo $title_for_layout; ?></div>
<?php
if($rel == 'browse') {
    $formUrl = array('controller' => 'banks', 'action' => 'edit', 'rel' => 'browse');
} else {
    $formUrl = array('controller' => 'banks', 'action' => 'edit');
}
echo $this->Form->create('Bank', array('url' => $formUrl, 'type' => 'text'));
echo $this->Form->input('id');
?>

<div class="wrapper-form-broking clearfix">
    <div class="wrapper-broking-inquyri clearfix">
        <div class="wrapper-inquirer clearfix">
            <span class="sp-bank-title"><?php echo __('Bank Name'); ?> (*):</span>
            <?php
            echo $this->Form->input('name', array(
                'value' => $this->data['Bank']['name'],
                'class' => 'inp-bank-name',
                'label' => false,
                'div' => false,)
            );
            ?>
        </div>

        <div class="wrapper-bank-content clearfix">
            <span class="sp-bank-title-bank-address"><?php echo __('Bank Address'); ?> :</span>
            <?php
            echo $this->Form->textarea('address', array(
                'value' => str_replace('<br />', '', $this->data['Bank']['address']),
                'class' => 'inp-contact-address',
                'label' => false,
                'div' => false,)
            );
            ?>
        </div>
        
        <div class="wrapper-bank-content clearfix">
            <span class="sp-bank-title"><?php echo __('Bank Account'); ?> (*):</span>
            <?php
            echo $this->Form->input('account', array(
                'value' => $this->data['Bank']['account'],
                'class' => 'inp-bank-acc',
                'label' => false,
                'div' => false,)
            );
            ?>
        </div>
        
        <div class="wrapper-bank-content clearfix">
            <span class="sp-bank-title"><?php echo __('Bank Account Name'); ?> :</span>
            <?php
            echo $this->Form->input('bank_account_name', array(
                'class' => 'inp-bank-name',
                'label' => false,
                'div' => false,)
            );
            ?>
            <span id="exsisterror"></span>
        </div>
        
        <div class="wrapper-bank-content clearfix">
            <span class="sp-bank-title"><?php echo __('SWIFT'); ?> (*):</span>
            <?php
            echo $this->Form->input('swift_code', array(
                'value' => $this->data['Bank']['swift_code'],
                'class' => 'inp-bank-acc',
                'label' => false,
                'div' => false,)
            );
            ?>
          
        </div>  
        
        <div class="wrapper-bank-content clearfix">
            <span class="sp-bank-title"><?php echo __('Currency'); ?> (*):</span>
            <?php
            echo $this->Form->input('Currency.Currency', array(
                'multiple' => false,
                'selected' => $this->request->data['Bank']['currency_id'],
                'empty' => false,
                'label' => false,
                'div' => false,)
            );
            echo $this->Form->input('Currency.Currency_Id', array(
                'value' => $this->request->data['Bank']['currency_id'],
                'type' => 'hidden',)
            );
            ?>
          
        </div>  
    </div>
</div>
<!-- HTML for buttom -form-->
<div class="wrapper-button-form">
    <div class="button-form">
        <div class="button-aihre button-blue"><a href="#" onclick="document.getElementById('BankAdminEditForm').submit()">SAVE</a></div>
        <div class="button-aihre button-blue">
            <?php
            if ($rel == 'browse') {
                echo $this->Html->link(__('CANCEL'), array('plugin' => null, 'controller' => 'banks', 'action' => 'browse'));
            } else {
                echo $this->Html->link(__('CANCEL'), array('plugin' => null, 'controller' => 'banks', 'action' => 'index'));
            }
            ?>
        </div>
            <?php
            if($this->data['Bank']['lock']<=0) {
            ?>
                <div class="button-aihre button-blue">
            <?php
            
                if ($rel == 'browse') {
                    echo $this->Html->link(__('DELETE'), array(
                        'controller' => 'banks',
                        'action' => 'delete',
                        'rel' => 'browse',
                        $this->data['Bank']['id'],
                        'token' => $this->params['_Token']['key'],), null, __('Are you sure you want to delete this Bank?'));
                } else {
                    echo $this->Html->link(__('DELETE'), array(
                        'controller' => 'banks',
                        'action' => 'delete',
                        $this->data['Bank']['id'],
                        'token' => $this->params['_Token']['key'],), null, __('Are you sure you want to delete this Bank?'));
                }
            ?>
                    </div>
                <?php
                }   
                ?>
        </div>
    </div>
<?php
echo $this->Form->end();
?>